#include<opencv2/opencv.hpp>
#include<iostream>
#include <string>
using namespace cv;
int main()
{
	//播放视频
	//读入视频
	VideoCapture capture("rtsp://192.168.1.10:554/user=admin&password=&channel=1&stream=0.sdp");
	while (1)
	{
		Mat frame;
		capture >> frame;//读取当前帧
		if (frame.empty())
		{
			break;
		}
        Mat shrink;
        resize(frame, shrink, Size(frame.cols/4, frame.rows/4), 0, 0, INTER_AREA);
		imshow("readvideo", shrink);//显示当前帧
		waitKey(1);//延时30ms
	}
	return 0;
}
